#include <stdio.h>
#include <string.h>

int main()
{
	char str[30],temp[30];
    int i=0,n=0,j;
	printf("Enter the string:: ");
	gets(str); //get the string from user.

	while(str[i]!='\0') // traverse thru the string till last word
	{
		n++; //counter is set to total lenght of string
		i++; // incresing to traverse thru string index
	}
	for(i=n-1,j=0;i>=0;i--,j++)
	{
		temp[j] =str[i];
	}
	temp[j]='\0';
 
	if((strcmp(temp,str))== 0)
			printf("\nEntered string is palindrome!!");	
	else
		printf("\nEntered string is not palindrome!!");
//	getch();
	return 0;
}
